package com.company;

import com.company.adapter.obj.AdapteeByObject;
import com.company.adapter.obj.AdapterByObject;
import com.company.adapter.obj.TargetByObject;

/**
 * 对象适配器模式测试代码
 */
public class TestForObject {

    public static void main(String[] args) {

        //原来的方法，即需要被适配的方法
        AdapteeByObject adaptee = new AdapteeByObject();
        adaptee.methodA();

        System.out.println("=========================");

        //适配后的方法
        TargetByObject target = new AdapterByObject();
        target.methodA();
        target.methodB();
        target.methodC();
    }
}
